package com.frogs.ucenter.v1.request;

import javax.servlet.http.HttpServletRequest;

import com.frogs.framework.web.HttpRequestInfo;
import com.frogs.system.util.ApiUrlParamEnum;
import com.frogs.system.util.TaskTypeEnum;
import com.frogs.system.web.api.request.Request;

/**
 * 任务列表请求参数类
 *
 * @author lijian
 * @version 2014年10月20日 - 上午11:02:00
 */
public class TaskInfoListRequest extends Request {

	private Integer taskType;
	
	private Integer subFlowId;
	
	private Integer userId;
	
	private Integer status;
	
	private Integer pageNo;
	
	private Integer pageSize;
	
	public TaskInfoListRequest() {
	}
	
	@Override
	public void parse(HttpServletRequest request) {
		HttpRequestInfo requestInfo = new HttpRequestInfo(request);
		
		this.taskType = requestInfo.getIntParameter(ApiUrlParamEnum.taskType.getParamName(), TaskTypeEnum.FLOWTASK.getId());
		this.subFlowId = requestInfo.getIntParameter(ApiUrlParamEnum.subFlowId.getParamName(), 0);
		this.userId = requestInfo.getIntParameter(ApiUrlParamEnum.userId.getParamName(), 0);
		this.status = requestInfo.getIntParameter(ApiUrlParamEnum.status.getParamName(), 0);
		this.pageNo = requestInfo.getIntParameter(ApiUrlParamEnum.pageNo.getParamName(), 1);
		this.pageSize = requestInfo.getIntParameter(ApiUrlParamEnum.pageSize.getParamName(), 10);
	}

	public Integer getTaskType() {
		return taskType;
	}

	public void setTaskType(Integer taskType) {
		this.taskType = taskType;
	}

	public Integer getSubFlowId() {
		return subFlowId;
	}

	public void setSubFlowId(Integer subFlowId) {
		this.subFlowId = subFlowId;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getPageNo() {
		return pageNo;
	}

	public void setPageNo(Integer pageNo) {
		this.pageNo = pageNo;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

}
